#include "macros.h"
#include "lcd.h"
#include "co2SensorMG811.h"
#include "cozir.h"
#include <SoftwareSerial.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include <Flash.h>
#include <avr/wdt.h>   //WATCHDOG TIMER

//  -------- PINES DIGITALES ----------------------------------------


//Pines de control de los dos canales del módulo de 2 relés
#define RELAY_ALARM_PIN   5
#define RELAY_FAN_PIN     4

//Pin digital del sensor de co2 (no lo uso actualmente)
#define CO2_BOOL_PIN      2

#define COZIR_RX_PIN      2
#define COZIR_TX_PIN      3



// -------- PINES ANALÓGICOS -------------------------
#define THRESHOLD_LEVEL_PIN  1
#define MG811_PIN            0  //define which analog input channel you are going to use

// -----------------------------------------------------------
#define SERIAL_BAUDRATE   57600
#define COZIR_SERIAL_BAUDRATE 9600
#define LOOP_DELAY         250 //ms
#define HEATING_TIME        2//60 //seg


#define BLANK_SPACE_CHAR 0x20
#define Z_CAPS_CHAR      0x5A

#define FLOAT_DECIMAL_PLACES 2

#define LCD_ROWS 2
#define LCD_COLS 16



Lcd lcd(LCD_ROWS, LCD_COLS);
Co2SensorMg811 mg811sensor(THRESHOLD_LEVEL_PIN, MG811_PIN);
SoftwareSerial cozirSerial(COZIR_RX_PIN, COZIR_TX_PIN);

